export interface IAppInfo {
    app_id: string;
    app_secret: string;
}
// 一些类定义，有些信息不是必须要有的, 后端自主发起测试使用
class BasicInfo {
    private _appId: string;
    private _appSecret: string;
    private _appToken: string;
    private _tenantKey: string;
    private _tenantToken: string;
    private _appTicket: string;

    constructor(appId: string, appSecret: string) {
        this._appId = appId;
        this._appSecret = appSecret;
    }


    public get appId(): string {
        return this._appId;
    }

    public set appId(value: string) {
        this._appId = value;
    }

    public get appSecret(): string {
        return this._appSecret;
    }

    public set appSecret(value: string) {
        this._appSecret = value;
    }

    public get appToken(): string {
        return this._appToken;
    }

    public set appToken(value: string) {
        this._appToken = value;
    }

    public get tenantKey(): string {
        return this._tenantKey;
    }

    public set tenantKey(value: string) {
        this._tenantKey = value;
    }

    public get tenantToken(): string {
        return this._tenantToken;
    }

    public set tenantToken(value: string) {
        this._tenantToken = value;
    }

    public get appTicket(): string {
        return this._appTicket;
    }

    public set appTicket(value: string) {
        this._appTicket = value;
    }

    clear(): void {
        this._appId = '';
        this._appSecret = '';
        this._appTicket = '';
        this._appToken = '';
        this._tenantToken = '';
        this._tenantKey = '';
    }
}

// 企业自建应用配置
export class ITenantAppConfig extends BasicInfo {
    constructor(appId: string, appSecret: string) {
        super(appId, appSecret);
    }
}

// isv 配置
export class IIsvAppConfig extends BasicInfo {

}

// 可能用到的用户信息
export class IUserConfig {
    private _userId: string;
    private _openId: string;
    private _unionId: string;
    private _mobile: string;
    private _userToken: string;
    private _email: string;
    private _refresh_token: string;

    get userId(): string {
        return this._userId;
    }

    set userId(value: string) {
        this._userId = value;
    }

    get openId(): string {
        return this._openId;
    }

    set openId(value: string) {
        this._openId = value;
    }

    get unionId(): string {
        return this._unionId;
    }

    set unionId(value: string) {
        this._unionId = value;
    }

    get mobile(): string {
        return this._mobile;
    }

    set mobile(value: string) {
        this._mobile = value;
    }

    get userToken(): string {
        return this._userToken;
    }

    set userToken(value: string) {
        this._userToken = value;
    }

    get email(): string {
        return this._email;
    }

    set email(value: string) {
        this._email = value;
    }

    get refreshToken(): string {
        return this._refresh_token;
    }

    set refreshToken(value: string) {
        this._refresh_token = value;
    }

    clear(): void {
        this._email = '';
        this._mobile = '';
        this._userId = '';
        this._userToken = '';
        this._unionId = '';
        this._refresh_token = '';
        this._openId = '';
    }
}
